import axios, { Axios } from 'axios'
const context = '/recipeservice'

/**
 * 获取 materialUnit 分页列表
 */
export function getMaterialUnitPagination(data: any) {
  return axios.get(`${context}/materialUnit/pagination`, { params: data })
}

/**
 * 获取 materialUnit 所有数据
 */
export function getMaterialUnitAllList(data: any) {
  return axios.get(`${context}/materialUnit/all`, { params: data })
}

/**
 * 获取 materialUnit 详情
 */
export function getMaterialUnitDetailById(id: any) {
  return axios.get(`${context}/materialUnit/${id}`, { params: { id } })
}

/**
 * 新增 materialUnit
 */
export function addMaterialUnit(data: any) {
  return axios.post(`${context}/materialUnit`, data)
}

/**
 * 修改 materialUnit
 */
export function updateMaterialUnit(data: any) {
  return axios.put(`${context}/materialUnit`, data)
}

/**
 * 删除 materialUnit
 */
export function batchRemoveMaterialUnit(data: any) {
  return axios.post(`${context}/materialUnit/batchRemove`, data)
}
